import React from 'react';
import { BrowserRouter, Switch, Route } from 'react-router-dom';
// 引用组件
import Login from './pages/login/Index';
import Login2 from './pages/login/DingtalkLogin';
import DefaultIndex from './pages/login/DefaultIndex';
import Index from './pages/index/Index';
import WebSSH from './pages/ssh/Index';
// 私有组件方法
import PrivateRouter from "./components/privateRouter/Index";
// store
import Store from "@/stroe/Index";
// Provider
import { Provider } from "react-redux";

class App extends React.Component {
  constructor(props){
    super(props);
    this.state = {};
  }

  render(){
    return (
      <Provider store={Store}>
        <BrowserRouter>
          <Switch>
            <Route exact component={DefaultIndex} path='/' />
            <Route exact component={Login} path="/login" />
            <Route exact component={Login2} path="/dingtalk/login" />
            <Route exact component={WebSSH} path="/ssh/:id" />
            <PrivateRouter component={Index} path="/index" />
          </Switch>
        </BrowserRouter>
      </Provider>
    )
  }
}

export default App;
